home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / thor / edge / cool.edge < prev    next >
Text File  |  1996-11-10  |  909b  |  46 lines

  1. /* Coolify (using "TEXT COOLER v1.0 by 
  2. ** DDT of the HALF-BRAINS TEAM")
  3. ** text block - by Troels Walsted Hansen
  4. ** added Edge support - Kirk A. Hans 
  5. ** Function: for now, it takes the text from the current line position to the
  6. **              end of the file and makes it "cool". Will added block support in
  7. **             the next version */
  8.  
  9. options results
  10.  
  11. getenvvar _WE_CursorY
  12. currline = result
  13.  
  14. getenvvar _WE_CursorX
  15. currcolumn = result
  16.  
  17. getenvvar _FE_Lines
  18. lastline = result
  19.  
  20. call open(tfh, "t:UncoolTempFile", W)
  21.  
  22. do i=currline to lastline
  23.     'Position' LINE i
  24.     getenvvar _WE_CLine RAW
  25.         lin = result
  26.  
  27.     if(lin~= "") then do
  28.     delete LINE
  29.     i = i-1
  30.     end
  31.     else break
  32.  
  33.     call writech(tfh,lin)
  34. end
  35.  
  36. call close(tfh)
  37.  
  38. address command "Cool >nil: t:UncoolTempFile t:CoolTempFile"
  39. call delete("t:UncoolTempFile")
  40.  
  41. Position currcolumn currline
  42. INCLUDE "t:CoolTempFile"
  43. call delete("t:CoolTempFile")
  44.  
  45. Position currcolumn currline
  46.